package aframe.http;

import java.io.File;

import aframe.http.bean.HttpTask;
import aframe.http.bean.URLEncoderStr;
import aframe.http.callback.HttpCallBack;
import aframe.http.net.AsyncHttp;


public class Http {
	public static final int GET = 0;
	public static final int POST = 1;

	public static final String CLASSNAME_STRING = String.class.getName();
	public static final String CLASSNAME_URLENCODE_STRING = URLEncoderStr.class.getName();
	public static final String CLASSNAME_FILE = File.class.getName();

	public static final String CHARSET_UTF_8 = "utf-8";
	public static final String CHARSET_ISO_8859_1 = "ISO-8859-1";
	public static final String CHARSET_GBK = "gbk";
	public static final String CHARSET_GB2312 = "gb2312";

	public static void doTask(HttpTask task, HttpCallBack callBack) {
		AsyncHttp.getInstance().doTask(task, callBack);
	}

	public static void doTask(HttpTask task, HttpCallBack callBack, String charset) {
		AsyncHttp.getInstance().doTask(task, callBack, charset);
	}
}
